//
//  UICollectionView+Manage.h
//  MGPublic
//
//  Created by lhongl on 2025/10/23.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UICollectionView (Manage)

#pragma mark - 注册cell
- (void)registerCellWithNibName:(NSString *)nibName;
- (void)registerCellWithClass:(Class)cellClass;

#pragma mark - 注册footerView
- (void)registerFooterViewWithNibName:(NSString *)nibName;
- (void)registerFooterViewWithClass:(Class)aClass;

#pragma mark - 注册Headerview
- (void)registerHeaderViewWithNibName:(NSString *)nibName;
- (void)registerHeaderViewWithClass:(Class)aClass;

#pragma mark - 获取cell
- (__kindof UICollectionViewCell *)dequeueReusableCellWithClass:(Class)cellClass forIndexPath:(NSIndexPath *)indexPath;

#pragma mark - headerView
- (__kindof UICollectionReusableView *)dequeueReusableHeaderWithClass:(Class)aClass forIndexPath:(NSIndexPath *)indexPath;
- (__kindof UICollectionReusableView *)dequeueReusableHeaderWithReuseIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath;

#pragma mark - footerView
- (__kindof UICollectionReusableView *)dequeueReusableFooterWithClass:(Class)aClass forIndexPath:(NSIndexPath *)indexPath;
- (__kindof UICollectionReusableView *)dequeueReusableFooterWithReuseIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath;
@end

NS_ASSUME_NONNULL_END
